<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2019 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: Forpastime < forpastime@qq.com>
// +----------------------------------------------------------------------
namespace app\partner\validate;

use think\Validate;

class PartnerValidate extends Validate
{
    protected $rule = [
        'name' => 'require',
        'account'  => 'require|unique',
        'password' => 'require',
    ];
    protected $message = [
        'name.require' => '合伙人名称不能为空',
        'account.unique'  => '用户名已存在',
        'account.require'  => '密码不能为空',
        'password.require' => '密码不能为空'
    ];

    protected $scene = [
        'add'  => ['name', 'account', 'password'],
        'edit' => ['name', 'account'],
    ];
}